package com.etone.smartAudit.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.etone.smartAudit.domain.AppManager;
import com.etone.smartAudit.mapper.AppManagerMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author jiayen
 * @since 2022-01-21 10:46:54
 */
@Slf4j
@Service
public class AppManagerService extends ServiceImpl<AppManagerMapper, AppManager> {

    public AppManager getAppManagerByAppId(String appid) {
        LambdaQueryWrapper<AppManager> appmanger = new LambdaQueryWrapper<>();
        appmanger.eq(AppManager::getAppId, appid);
        try {
            AppManager manager = this.getOne(appmanger);
            return manager;
        } catch (Exception e) {
            log.error("获取应用管理错误", e);
            return null;
        }

    }

}
